using System;
using System.Collections.Generic;
using System.Text;



namespace PDO.Utilities
{
    public class BaseException : Exception
    {
        private static Guid DEFAULT_LOGGING_USER = new Guid("40d1a1c1-9eb6-4584-9aad-9d558955c408");

        #region Protected Data Members
        //protected ErrorMessageInformation m_MessageForUser;
        protected Guid m_User = DEFAULT_LOGGING_USER;
        protected Guid m_ApplicationGuid = new Guid("2e3c795b-8532-43e7-a8fe-b0b234242e15");
        protected string m_Subsystem = "";
        #endregion

        #region Constructors
        /// <summary>
        /// Default Constructor for UIPolicyException
        /// </summary>
        public BaseException()
            : base()
        {
            // m_MessageForUser = new ErrorMessageInformation();
        }


        /// <summary>
        /// Constructor for BaseException
        /// </summary>
        /// <param name="message">Exception Message</param>
        public BaseException(string message)
            : base(message)
        {
            //m_MessageForUser = new ErrorMessageInformation();
        }

        /// <summary>
        /// Constructor for BaseException
        /// </summary>
        /// <param name="message">Exception Message</param>
        /// <param name="innerEx">Inner Exception</param>
        public BaseException(string message, Exception innerEx)
            : base(message, innerEx)
        {
            //m_MessageForUser = new ErrorMessageInformation();
        }


        /// <summary>
        /// Default Constructor for UIPolicyException
        /// </summary>
        /// <param name="user">User to log to</param>
        public BaseException(Guid user)
            : base()
        {
            //m_MessageForUser = new ErrorMessageInformation();
            m_User = user;
        }

        /// <summary>
        /// Constructor for BaseException
        /// </summary>
        /// <param name="message">Exception Message</param>
        /// <param name="user">User to log to</param>
        public BaseException(string message, Guid user)
            : base(message)
        {
            m_User = user;
            //m_MessageForUser = new ErrorMessageInformation();
        }


        /// <summary>
        /// Constructor for BaseException
        /// </summary>
        /// <param name="message">Exception Message</param>
        /// <param name="innerEx">Inner Exception</param>
        /// <param name="user">User to log to</param>
        public BaseException(string message, Exception innerEx, Guid user)
            : base(message, innerEx)
        {
            m_User = user;
            //m_MessageForUser = new ErrorMessageInformation();
        }

        #endregion

        #region Public Properties


        /// <summary>
        /// Gets/Sets the user to log error to
        /// </summary>
        public Guid User
        {
            get { return m_User; }
            set { m_User = value; }
        }

        /// <summary>
        /// Gets/Sets the application to log error against
        /// </summary>
        public Guid ApplicationGuid
        {
            get { return m_ApplicationGuid; }
            set { m_ApplicationGuid = value; }
        }

        /// <summary>
        /// Gets/Sets the application's Subsystem to log error againsts
        /// </summary>
        public string Subsystem
        {
            get { return m_Subsystem; }
            set { m_Subsystem = value; }
        }
        #endregion
    }
}
